<script lang="ts" setup>
import useStore from '../store'

const {newsList,channels} = useStore()
channels.$subscribe(()=>{
  newsList.getNewsList(channels.active)
})

</script>

<template> 
  <div className="list">
    <div className="article_item" v-for="item in newsList.lists" :key="item.art_id">
      <h3 className="van-ellipsis">{{item.title}}</h3>
      <div className="img_box" v-for="imgs in item.cover.images" :key="imgs">
        <img
          :src="imgs"
          className="w100"
          alt=""
        />
      </div>
      <div className="info_box">
        <span>{{item.aut_name}}</span>
        <span>{{item.comm_count}}评论</span>
        <span>{{item.pubdate}}</span>
      </div>
    </div>
  </div>
</template>

<style scoed lang="less"></style>
